<?php
/**
 * Created by PhpStorm.
 * User: teddy
 * Date: 16-1-20
 * Time: 上午9:56
 */
if(session_status() != PHP_SESSION_ACTIVE) {
    session_start();
}
if(isset($_SESSION["usr"])) {
    $currentUser = $_SESSION["usr"];
    echo "<input type='hidden' name='usr' id='usr' value='$currentUser' > ";
}
?>
<!--HTML-->
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="21 cake Api test">
        <meta name="author" content="Teddy Long">
        <!--ICON-->
        <link rel="icon" href="favicon.ico" type="image/x-icon" />
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
        <!--Title-->
        <title>21 Cake SiteMap Test</title>
        <!--BootStrap Component-->
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/bootstrap-theme.min.css" rel="stylesheet">
        <link href="css/bootstrap-table.min.css" rel="stylesheet" >
        <link href="css/font-awesome.css" rel="stylesheet">
        <link href="css/theme.css" rel="stylesheet" >
        <!--BootStrap Select-->
        <link href="css/bootstrap-select.css" rel="stylesheet" >
        <!--Sweet Alert-->
        <link href="css/sweetalert.css" rel="stylesheet" >
    </head>

    <body role="document">
    <!--fixed nav bar-->
        <nav class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand" href="index.php">21 Cake</a>
                </div>
                <div id="navbar" class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="index.php">Home</a></li>
                        <li><a href="Manage.php">Manage Page</a></li>
                    </ul>
                    <!--Login Form-->
                    <form id="loginForm" class="navbar-form navbar-right" method="post" style="margin-top: 10px" action="Admin.php">
                        <div class="form-group">
                            <input type="text" style="width: 150px; height: 30px" name="username" placeholder="User Name" class="form-control">
                        </div>
                        <div class="form-group">
                            <input type="password" style="width: 150px;height: 30px" name="password" placeholder="Password" class="form-control">
                        </div>
                        <button type="submit" style="height: 30px" class="btn btn-success">Sign</button>
                    </form>
                </div>
            </div>
        </nav>
        <!--Header Image-->
        <header class="sb-page-header">
            <div class="container">
                <h1>21 Cake Test Portal</h1>
                <p>API Test, Web UI Test, App Test etc...</p>
            </div>
        </header>
        <div class="container" role="main">
            <div class="row">
                <div class="panel panel-primary">
                    <div class="panel-heading">SiteMap Test Result</div>
                    <table id="SiteMapResultTable"
                           data-toggle="table"
                           data-url="getTestSiteMap.php"
                           data-pagination="true"
                           data-row-style="rowStyle">
                        <thead>
                        <tr>
                            <th data-sortable="true" data-halign="center" data-align="center" data-field = "day">Time</th>
                            <th data-sortable="true" data-halign="center" data-align="center" data-field= "status">Status</th>
                            <th data-sortable="true" data-halign="center" data-align="center" data-field= "count">Count</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <div style="margin-top: 50px;width:100%;">
                    <div>
                        <!--Line Chart-->
                        <div id="lineChart"></div>
                    </div>
                </div>
            </div>
        </div>

        <!--JS LOAD-->
        <script src="js/jquery.min.js"></script>
        <script data-pace-options='{ "document": true }' src="js/pace.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="js/bootstrap-table.min.js"></script>
        <script src="js/sweetalert.min.js"></script>
        <script src="js/highcharts.js"></script>
        <script src="js/data.js"></script>
        <script src="js/SiteMap.js"></script>
    </body>
</html>